//bool, Obj this, Obj other

Unit me, him;
Building bld;

me = this.AsUnit();
if(!me.IsValid()) return false;

him = other.AsUnit();
if(him.IsValid()){
	if(!me.IsEnemy(him)) return false;
	if(!me.IsValidTarget(him)) return false;

	if(me.IsHeirOf("Peaceful")) return false;
	if(me.IsHeirOf("Animal")) return false;
	
	return true;
}

bld = other.AsBuilding();
if(bld.IsValid()){
	if(!me.IsEnemy(bld)) return false;
	if(!me.IsValidTarget(bld)) return false;

	if(me.IsHeirOf("Melee")) return false;
	if(me.IsHeirOf("Peaceful")) return false;
	if(me.IsHeirOf("Animal")) return false;
	
	return true;
}
return false;
